Daniel Boles [Wed, 31 May 2017 17:47:57 +0000 (18:47 +0100)]
HighContrast: Regenerate CSS files with sassc
Daniel Boles [Wed, 31 May 2017 17:45:24 +0000 (18:45 +0100)]
HighContrast: Update parse-sass.sh; remove Gemfile
Make parse-sass.sh use sassc instead of the old Ruby method.
Daniel Boles [Wed, 31 May 2017 07:16:51 +0000 (08:16 +0100)]
themes: Square corners on fullscreen win headerbar
Totem uses a fullscreen window with a headerbar at the top, and without
this change, that headerbar has rounded corners, which look different
from a maximised window and let video content show through beneath.
https://bugzilla.gnome.org/show_bug.cgi?id=770513
Daniel Boles [Wed, 31 May 2017 07:14:26 +0000 (08:14 +0100)]
HighContrast: Restore files to regenerate CSS
I think parse-sass.sh needs updated to match what Adwaita does now, but
for now, this is sufficient to let us regenerate HighContrast again.
Rico Tzschichholz [Tue, 30 May 2017 13:10:25 +0000 (15:10 +0200)]
gdk/gtk: Fix Since tags for 3.92 symbols
In addition to
406db15066f121c2b9910691f92e5841b30e0311
Debarshi Ray [Wed, 24 May 2017 14:42:01 +0000 (16:42 +0200)]
wayland: Don't warn if the display is lost, skip exit handlers
There is no need to have every application log a warning when the
Wayland display server goes away, and we are using _exit instead of
exit elsewhere.
This is also what the X11 backend does (see gdk_x_io_error).
https://bugzilla.gnome.org/show_bug.cgi?id=745289
Daniel Boles [Sun, 28 May 2017 13:19:14 +0000 (14:19 +0100)]
gdk/gtk: Fix more AVAILABLE_IN annotations to 3_92
Daniel Boles [Sat, 27 May 2017 14:25:35 +0000 (15:25 +0100)]
gdkevents.h: Fix version annotations on new funcs
Carlos Garnacho [Thu, 25 May 2017 14:00:40 +0000 (16:00 +0200)]
gtk: Make GtkPointerFocus refcounted
In order to make it really sure the GtkPointerFocus is valid while being
removed from a GtkWindow.
Carlos Garnacho [Wed, 24 May 2017 23:59:40 +0000 (01:59 +0200)]
gtkwidget: Lookup the event target when cancelling GdkEventSequences
We were getting the toplevel most often here, so the gestures weren't
properly cleaned up.
Carlos Garnacho [Wed, 24 May 2017 23:57:22 +0000 (01:57 +0200)]
gtk: Check implicit grab status before sending crossing events
As we now refrain from sending the crossing events if there's an
implicit grab, those events must be sent on button release when
the implicit grab is broken.
Carlos Garnacho [Wed, 24 May 2017 23:50:38 +0000 (01:50 +0200)]
gtk: Refactor crossing event synthesization into a separate function
This is now called outside update_pointer_focus_state() with the events
that actually matter (i.e. pointer ones, so no sequence == NULL checks)
Carlos Garnacho [Wed, 24 May 2017 23:45:18 +0000 (01:45 +0200)]
gtk: Rework pointer cursor selection
Check the grab widget (both explicit and implicit) and check for a cursor
from the target widget up to this grab widget. If the target widget is
outside the grab widget, only the grab wigdet's cursor will be checked.
This also means that we have to ensure the cursor is updated on button
releases, as an implicit grab being deactivated must trigger a cursor
lookup from the target widget.
Carlos Garnacho [Wed, 24 May 2017 16:30:35 +0000 (18:30 +0200)]
gtktreeview: Fix invalidation coordinates
We must account for the widget allocation now that there is no view_window.
Carlos Garnacho [Wed, 24 May 2017 16:30:25 +0000 (18:30 +0200)]
gtkiconview: Fix invalidation coordinates
We must account for the widget allocation now that there is no view_window.
Carlos Garnacho [Wed, 24 May 2017 16:22:00 +0000 (18:22 +0200)]
gtkgesture: Consume button release/touch end events if gesture was claimed
In these situations we must perform the "is it claimed" check before removing
the (touch)point, as doing so when the gesture is empty will be too late if
the gesture actually claimed input.
Timm Bäder [Sun, 21 May 2017 07:27:57 +0000 (09:27 +0200)]
main: Automatically (un)set PRELIGHT state on widgets
Timm Bäder [Sat, 20 May 2017 07:00:07 +0000 (09:00 +0200)]
Gesture: Remove window property completely
These are just leftovers, it's already gone from public API and the
_{set,get}_property implementations.
Carlos Garnacho [Mon, 15 May 2017 11:44:33 +0000 (13:44 +0200)]
gtk: Fix event delivery on GTK_PHASE_TARGET controllers
Look up the event target, not the "event widget" which is based on the
event window, and thus points to the toplevel.
Carlos Garnacho [Sun, 14 May 2017 19:34:15 +0000 (21:34 +0200)]
gdk: Remove synthetic crossing event emission due to geometry changes
This just applied to child windows, but now GDK should just take care of
toplevels, which shall get crossing events from the windowing when the right
conditions apply.
Removing this code fixes confused crossing state in widgets and messed up
window_under_pointer tracking (Which now is meant to be toplevels) when any
of the remaining child GdkWindows trigger these crossing events.
Carlos Garnacho [Sun, 14 May 2017 19:30:16 +0000 (21:30 +0200)]
gdk: Ensure to implicitly deactivate grabs when an impl window is hidden
For some reason this wasn't done on windows with an impl, but it totally should.
Probably hidden by grabs in menus and somesuch being done on a child window.
Carlos Garnacho [Fri, 12 May 2017 10:42:48 +0000 (12:42 +0200)]
gtkpopover: Use event coordinates right away to detect clicks outside.
There's no need anymore to translate coordinates, the event already contains
popover-relative ones.
Carlos Garnacho [Fri, 12 May 2017 10:38:04 +0000 (12:38 +0200)]
gtkwindow: Implement ::pick to extend picking to popovers.
This makes interaction possible with popovers again.
Timm Bäder [Wed, 10 May 2017 16:08:43 +0000 (18:08 +0200)]
widget: Make sure we're not calling _get_parent on NULL
We already issue the first _get_parent call before even entering that
loop, so make sure `parent` is not NULL. This happens when event_widget
is already a toplevel, and this change fixes row-dragging in treeviews.
Timm Bäder [Wed, 10 May 2017 16:03:10 +0000 (18:03 +0200)]
Constify GdkEvent parameters in gtk_get_event_widget and _event_target
Timm Bäder [Wed, 10 May 2017 10:18:32 +0000 (12:18 +0200)]
flowbox: Fix motion notify handler
Same story as in GtkListBox.
Timm Bäder [Wed, 10 May 2017 10:11:58 +0000 (12:11 +0200)]
flowbox: Fix child item selection
Timm Bäder [Wed, 10 May 2017 10:07:15 +0000 (12:07 +0200)]
flowbox: Fix child item allocation
Timm Bäder [Wed, 10 May 2017 08:55:50 +0000 (10:55 +0200)]
scrolledwindow: Avoid critical when removing source
Make sure indicator->conceil_timer is actually set before trying to
remove it.
Timm Bäder [Tue, 9 May 2017 17:38:58 +0000 (19:38 +0200)]
testlist: Fix custom css
Timm Bäder [Tue, 9 May 2017 17:26:27 +0000 (19:26 +0200)]
scrolledwindow: Calculate indicator coords relative to scrolledwindow
The event coordinates we get are relative to the scrolledwindow
coordinates.
Timm Bäder [Tue, 9 May 2017 17:03:38 +0000 (19:03 +0200)]
scrolledwindow: Stop checking event->detail in leave-notify
This is obsolete and resulted in sometimes stuck .hovering style classes
on scrollbars.
Timm Bäder [Tue, 9 May 2017 14:53:45 +0000 (16:53 +0200)]
linkbutton: Fix hand cursor when hovering
Use the new gtk_widget_set_cursor instead of setting it on the
GdkWindow.
Timm Bäder [Tue, 9 May 2017 14:23:01 +0000 (16:23 +0200)]
listbox: Fix row hovering
Drop the in_widget flag since motion events the listbox receives are
always inside the listbox. Also drop the manual coordinate translation
code using GdkWindows.
Timm Bäder [Tue, 9 May 2017 13:48:20 +0000 (15:48 +0200)]
widget: Copy event in gtk_widget_event and _captured_event
To ensure that we never translate the coordinates to widget coordinates
twice.
Timm Bäder [Tue, 9 May 2017 09:10:55 +0000 (11:10 +0200)]
meson: Add gtkpointerfocus.c to sources
Timm Bäder [Tue, 9 May 2017 06:32:06 +0000 (08:32 +0200)]
window: Hide titlebox when undecorated
We don't draw or size-allocate the titlebar when the window is
fullscreen or undecorated, so reflect this by setting it to
!child_visible. This can happen when changing the value of the decorated
property while the window is shown.
Timm Bäder [Tue, 9 May 2017 06:22:41 +0000 (08:22 +0200)]
combobox: Only react to UP/DOWN scroll events
The old else block scrolled down for everything except GDK_SCROLL_UP
scroll events, e.g. for smooth scroll events.
Carlos Garnacho [Tue, 2 May 2017 15:53:14 +0000 (17:53 +0200)]
gtkmenu*: Simplify event handling
Instead of delegating on the parent shell of a menu item/shell on a variety
of situations, Simplify event handling so:
1) Menu item selection is handled entirely on GtkMenuItem through crossing
events.
2) The deepmost menu shell handles clicks inside and outside of it.
This avoids the rather hard to follow gtk_widget_event() calls going on all
throughout the handling of crossing and button events, and makes menus work
again.
Carlos Garnacho [Thu, 4 May 2017 11:49:34 +0000 (13:49 +0200)]
gtkmain: Add API to get the target of a GdkEvent
This can be used on grabbing situations to determine the target of
the event. This mainly matters for GtkMenu.
Carlos Garnacho [Thu, 4 May 2017 11:48:27 +0000 (13:48 +0200)]
gtkmain: Ensure there is a current event handling crossing events
The "current event" will be the real one that is triggering the crossing
notifications, not the synthesized events.
Carlos Garnacho [Thu, 4 May 2017 11:45:30 +0000 (13:45 +0200)]
gtkmain: Ignore GDK_CROSSING_GRAB/UNGRAB crossing events for picking purposes
Especially with owner_events=TRUE, this doesn't mean anything for picking, as
events will be reported as usual inside the application.
Carlos Garnacho [Thu, 4 May 2017 11:41:29 +0000 (13:41 +0200)]
gdk: Make it possible to attach user data to GdkEvents
As event->any.window is the toplevel, this is not useful anymore to
determine the window/widget that is the target for this event. Add
helper functions to attach user data to GdkEvents so the target
widget can be stored on the gtk/ side.
These calls should be made private with the rest of GdkEvent related
API.
Carlos Garnacho [Thu, 13 Apr 2017 13:42:48 +0000 (15:42 +0200)]
gtkmain: Avoid doubly propagation of enter/leave events from windowing
Crossing events are already generated when picking the new pointer position,
so we don't have to propagate the windowing crossing event as-is.
Carlos Garnacho [Wed, 12 Apr 2017 10:11:56 +0000 (12:11 +0200)]
gtknotebook: Drop drag_window
It is not necessary anymore to implement tab DnD, since we just render
it on top.
Carlos Garnacho [Mon, 10 Apr 2017 15:19:37 +0000 (17:19 +0200)]
gtkiconview: Remove view GdkWindow
It's not necessary anymore for clipping nor receiving events. So just
remove it. The event handling code was expecting events in bin_window
coordinates, and have been updated to relying on widget-relative coords.
Carlos Garnacho [Thu, 6 Apr 2017 19:14:28 +0000 (21:14 +0200)]
gtkviewport: Remove view window
It is not really necessary for clipping nor receiving events.
Carlos Garnacho [Thu, 6 Apr 2017 18:55:07 +0000 (20:55 +0200)]
gtkrevealer: Remove view window
It's not necessary anymore for either clipping or event delivery
Carlos Garnacho [Thu, 6 Apr 2017 18:48:03 +0000 (20:48 +0200)]
gtkpaned: Remove per-child windows
Those are no longer necessary for clipping nor receiving events, so just
remove them.
Carlos Garnacho [Thu, 6 Apr 2017 12:50:28 +0000 (14:50 +0200)]
gtklayout: Remove widget window
It can be entirely replaced by a clip allocation on the widget.
Carlos Garnacho [Thu, 6 Apr 2017 11:56:36 +0000 (13:56 +0200)]
gtkoverlay: Remove per-child windows
They are no longer necessary to do child positioning nor input
handling.
Carlos Garnacho [Thu, 6 Apr 2017 11:55:35 +0000 (13:55 +0200)]
gtkwidget: Add private set_pass_through() call
We could eventually support pointer-event in CSS here, in the mean
time add this call to replace the GdkWindow API.
Carlos Garnacho [Thu, 6 Apr 2017 10:53:22 +0000 (12:53 +0200)]
gtktreeview: Remove header window
It is no longer necessary to overlay the column headers above the
treeview.
Carlos Garnacho [Wed, 5 Apr 2017 14:58:12 +0000 (16:58 +0200)]
gtktreeview: Remove widget window
It can be entirely replaced by setting a proper clip rectangle.
Carlos Garnacho [Wed, 5 Apr 2017 14:30:07 +0000 (16:30 +0200)]
gtkstack: Remove view window
This widget already sets a clip area, so the view window can be safely
removed.
Carlos Garnacho [Tue, 4 Apr 2017 16:55:33 +0000 (18:55 +0200)]
gtktoolpalette: Remove child window
This is not necessary for rendering anymore, as the clip is set by the
parent scrolledwindow. It's not necessary either for receiving input
events.
Carlos Garnacho [Tue, 4 Apr 2017 16:18:44 +0000 (18:18 +0200)]
gtkflowbox: Remove child window
This widget correctly sets up a clip, so it is not necessary neither
for rendering nor for receiving input events.
Carlos Garnacho [Tue, 4 Apr 2017 15:09:41 +0000 (17:09 +0200)]
gtkwidget: Visually update cursors inside widget when changing cursor
Carlos Garnacho [Tue, 4 Apr 2017 15:09:22 +0000 (17:09 +0200)]
gtkmain: Use window-internal API to update pointer cursors
Carlos Garnacho [Tue, 4 Apr 2017 15:08:48 +0000 (17:08 +0200)]
gtkwindow: Add private API to update pointer cursors
Carlos Garnacho [Mon, 3 Apr 2017 22:40:12 +0000 (00:40 +0200)]
gtkscrolledwindows: Remove child windows
Both for the view (compensated by widget clip) and the scrollbar
indicators (just not needed anymore).
Carlos Garnacho [Sun, 2 Apr 2017 22:33:56 +0000 (00:33 +0200)]
gtkexpander: Remove event window
Detect presses/releases inside the label area instead.
Carlos Garnacho [Sun, 2 Apr 2017 16:36:21 +0000 (18:36 +0200)]
gtkwindow: Implement window resizing sans-GdkWindow
We can just replace window comparisons with coordinate matching, the
cursor corresponding to edges is now set in a capture-phase motion
handler, as cursors aren't set on GdkWindows anymore.
Carlos Garnacho [Sun, 2 Apr 2017 14:41:44 +0000 (16:41 +0200)]
gtktoolitem: Remove gtk_tool_item_set_use_drag_window()
This API call is not necessary anymore, since it's no longer necessary
to receive events.
Carlos Garnacho [Sun, 2 Apr 2017 14:35:16 +0000 (16:35 +0200)]
gtkswitch: Remove event window
It's not necessary anymore to receive input events. The pan gesture has
been set on the capture phase as the child widgets may capture during
bubbling.
Carlos Garnacho [Sun, 2 Apr 2017 14:28:26 +0000 (16:28 +0200)]
gtkmenuitem: Remove input window
It's not necessary anymore to receive events.
Carlos Garnacho [Sun, 2 Apr 2017 14:25:55 +0000 (16:25 +0200)]
gtkglarea: Remove input window
It's not necessary to receive events anymore.
Carlos Garnacho [Sun, 2 Apr 2017 14:24:31 +0000 (16:24 +0200)]
gtkseparatortoolitem: Remove event window
It's not necessary. It wasn't either before, as this widget handles no
events.
Carlos Garnacho [Sun, 2 Apr 2017 14:19:58 +0000 (16:19 +0200)]
gtkcolorswatch: Remove input window
It's not necessary to receive events anymore.
Carlos Garnacho [Sun, 2 Apr 2017 13:29:33 +0000 (15:29 +0200)]
gtkcolorplane: Remove event window
It is not necessary anymore to receive events.
Carlos Garnacho [Sun, 2 Apr 2017 13:19:39 +0000 (15:19 +0200)]
gtkrange: Remove event window
This is not necessary anymore to receive input events.
Carlos Garnacho [Sun, 2 Apr 2017 13:15:38 +0000 (15:15 +0200)]
gtkpathbar: Remove event window
This is not necessary anymore to receive scroll events.
Carlos Garnacho [Sun, 2 Apr 2017 13:04:18 +0000 (15:04 +0200)]
gtktoolbar: Remove input window
This is not necessary to receive events anymore.
Carlos Garnacho [Sun, 2 Apr 2017 11:33:12 +0000 (13:33 +0200)]
label: Remove selection window
It's no longer needed to receive events while the label is selectable.
Carlos Garnacho [Sun, 2 Apr 2017 09:00:34 +0000 (11:00 +0200)]
gtknotebook: Remove event window on top of tabs
No longer needed.
Carlos Garnacho [Sat, 1 Apr 2017 20:41:23 +0000 (22:41 +0200)]
gtkwindow: Ignore implicit grabs going away if there is no focus
There should be no circumstances where an implicit grab is requested but
no focus exists, there's however circumstances (like windowing grabs taking
input to a different window) where we might get implicit grabs being undone
when then new window didn't create a focus for the pointer itself.
Carlos Garnacho [Sat, 1 Apr 2017 20:38:02 +0000 (22:38 +0200)]
gtkwindow: Revoke implicit grabs when activating an explicit one
Only if they fall outside the grab widget, in that case the widget holding
the implicit grab won't be receiving events anymore, so we can just undo
it.
Carlos Garnacho [Fri, 31 Mar 2017 17:11:03 +0000 (19:11 +0200)]
gtkbutton: Make windowless
It is no longer necessary to receive events, so it's relatively straightforward
now to drop.
Carlos Garnacho [Fri, 31 Mar 2017 16:58:16 +0000 (18:58 +0200)]
gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.
Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
Carlos Garnacho [Fri, 31 Mar 2017 16:25:04 +0000 (18:25 +0200)]
gtkwidget: Make gtk_widget_event() Accept pointing events in root coordinates
This function will, at the last minute, ensure the event contains the right
widget-relative coordinates for the widget the event is being emitted to.
Carlos Garnacho [Fri, 31 Mar 2017 16:16:19 +0000 (18:16 +0200)]
gtkgesture: Drop GdkWindow checks
Those are now needless and wrong, as we get guarantees that handled
events will contain widget-relative coordinates. A side effect is
that these events are very possibly not explicitly sent to the
GdkWindow that implementations expect, any extra checks performed
through gtk_gesture_set_window() will be wrong, so the function has
been dropped entirely.
Carlos Garnacho [Fri, 31 Mar 2017 16:12:57 +0000 (18:12 +0200)]
gtkexpander: Drop usage of gtk_gesture_set_window()
It's now meaningless since the gesture will receive the event despite
the input only window.
Carlos Garnacho [Fri, 31 Mar 2017 16:11:52 +0000 (18:11 +0200)]
gtkcolorplane: Drop usage of gtk_gesture_set_window()
It's now meaningless since the widget will receive the event despite
the input window.
Carlos Garnacho [Fri, 31 Mar 2017 16:07:22 +0000 (18:07 +0200)]
gtknotebook: Fix coordinate translation to happen on widget-relative coordinates
This makes notebooks happy again after changing event coordinates to always come in
the widget coordinate system.
Carlos Garnacho [Fri, 31 Mar 2017 16:06:19 +0000 (18:06 +0200)]
gtktextview: Drop GdkWindow checks on events
These are now wrong and prevent the code from running correctly.
Carlos Garnacho [Fri, 31 Mar 2017 16:03:42 +0000 (18:03 +0200)]
gtktreeview: Drop gtk_gesture_set_window() API
It is now meaningless and wrong, since GdkWindows aren't used anymore
to determine the event target.
Carlos Garnacho [Fri, 31 Mar 2017 16:02:16 +0000 (18:02 +0200)]
gtktextview: Set "text" pointer cursor
This is no longer set through the Gdkwindow, so use private GtkWidget
API.
Carlos Garnacho [Fri, 31 Mar 2017 16:01:13 +0000 (18:01 +0200)]
gtkentry: Remove text_area window
And refurbish cursor management to be set on the GtkWidget. The
input window is not needed anymore to receive events either.
This is no longer set through the GdkWindow, so use the private
GtkWidget API.
Carlos Garnacho [Fri, 31 Mar 2017 15:19:37 +0000 (17:19 +0200)]
gtkwidget: Add private cursor setter/getter
This should be eventually replaced by CSS cursors, but at the moment
it must be handled on the gtk/ side.
Carlos Garnacho [Sat, 1 Apr 2017 21:25:13 +0000 (23:25 +0200)]
imcontext: Remove API dependency on GdkWindow
There is now a set_client_widget() to hint the IM about positioning
and whatnot.
Carlos Garnacho [Fri, 31 Mar 2017 15:59:43 +0000 (17:59 +0200)]
gtkbutton: Handle crossing events without the event window
The event shall no longer be "directed" to the event window, but the
widget. Getting a enter/leave event is enough now to know whether the
pointer is inside or outside the widget.
Carlos Garnacho [Fri, 31 Mar 2017 15:57:44 +0000 (17:57 +0200)]
gtkpointerfocus: Add methods to handle implicit grabs on widgets
Just a basic setter/getter, plus a method to obtain the right logical target
in the presence or absence of these.
Carlos Garnacho [Fri, 31 Mar 2017 15:55:49 +0000 (17:55 +0200)]
gtk: Implement per-focus implicit grabs
Unlike GTK+ grabs which are global to all/one device, the implicit grab
is per focus, which means each may have implicit grabs on different or
the same widget.
Carlos Garnacho [Fri, 31 Mar 2017 15:54:06 +0000 (17:54 +0200)]
gtk: Implement cursor updates
As we don't obey GdkWindow cursors anymore, someone must set those.
Use the private Gtkwidget API at the moment.
Carlos Garnacho [Fri, 31 Mar 2017 15:49:21 +0000 (17:49 +0200)]
gtk: Update GtkPointerFocus targets on mapping/sensitivity changes
Those are situations that must cause foci on these widgets to repick
themselves.
Carlos Garnacho [Fri, 31 Mar 2017 15:46:35 +0000 (17:46 +0200)]
gdkwindow: Drop csw-side event translation
Now that gtk_main_do_event() is able to handle pointing events in toplevel
coordinates, forward all of these as is. Just minimal handling is still done
on the gdk side for GDK grab accounting, and toplevel tracking for each
pointer.
Carlos Garnacho [Fri, 31 Mar 2017 15:38:38 +0000 (17:38 +0200)]
gtk: Handle events with coordinates in toplevel-relative ones
Implement target finding per-pointer/touchpoint through GtkPointerFocus and
_gtk_toplevel_pick(). Focus changes are handled through the emission of
crossing events between the old target and the new one.
Carlos Garnacho [Fri, 31 Mar 2017 15:31:20 +0000 (17:31 +0200)]
gtkwindow: Add management functions for GtkPointerFocus instances
Each toplevel will keep its own tracking of the current ongoing foci,
add the plumbing that will allow to create/update/remove those as they
come and go.
Carlos Garnacho [Fri, 31 Mar 2017 15:22:00 +0000 (17:22 +0200)]
gtk: Introduce GtkPointerFocus
These objects (tied to a toplevel) track the focus of a pointer/touchpoint.
The info in these basically consists of current toplevel coordinates and the
current target widget.
Carlos Garnacho [Fri, 31 Mar 2017 15:16:47 +0000 (17:16 +0200)]
gtkwidget: Expose gtk_widget_common_ancestor()
This function will be useful in other places, such as determining the
widgets that must receive crossing events after pointer picking points
to another widget.